﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTelluro.Explorer.Application.MainBoundContext;
using iTelluro.Explorer.AjaxHelper;
using iTelluro.Explorer.Application.MainBoundContext.DTO;

namespace iTelluro.Explorer.Controller
{
    public class AjaxwarningInfo
    {
        private ImeteorologicalAppService _meteorologicalAppService;
        public AjaxwarningInfo(ImeteorologicalAppService _meteorologicalAppService)
        {
            this._meteorologicalAppService = _meteorologicalAppService;

        }

        [Action]

        public object Get(string name)
        {
            MetalertDTO dto = _meteorologicalAppService.Get(name);
            dto = dto == null ? new MetalertDTO() : dto;
            return new JsonResult(dto);
        }
    }
}
